<?
	function sendEmail()
	{	
		$email = $_POST['useremail'];	
		if (mail($email,'Congratulations!','You are now registered within our database!')) {
			header("Location: emailsent.php");
			} else {
			echo '<p>Mail could not be sent.</p>';
			} 
		
	}

	sendEmail();

?>
